//
//  SHBigPictureCell.m
//  UI_CarHome
//
//  Created by dllo on 15/10/29.
//  Copyright (c) 2015年 沈浩. All rights reserved.
//

#import "SHBigPictureCell.h"
#import "SHHandle.h"
@implementation SHBigPictureCell


- (void)dealloc
{
    [_typenameLabel release];
    [_titleLabel release];
    [_audienceLabel release];
    [_timeLabel release];
    [_bgimageView release];
    [_playLabel release];
    [super dealloc];
    
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView
{
    self.typenameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.typenameLabel];
    [_typenameLabel release];
    
    self.timeLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.timeLabel];
    [_timeLabel release];
    
    self.audienceLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.audienceLabel];
    [_audienceLabel release];
    
    self.timeLabel = [[UILabel alloc] init];
    [self addSubview:self.timeLabel];
    [_timeLabel release];
    
    self.bgimageView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.bgimageView];
    [_bgimageView release];
    
   }

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.typenameLabel.frame = CGRectMake(10, 10, (WIDTHS - 20) / 4, 15);
    self.titleLabel.frame = CGRectMake(10, 25, (WIDTHS - 20) * 2 / 3, (HEIGHTS - 45 ) / 5);
    self.audienceLabel.frame = CGRectMake(10 + (WIDTHS - 20) * 2 / 3 + 10, 25, (WIDTHS - 20) / 3 - 10, (HEIGHTS - 45) / 5);
    self.bgimageView.frame = CGRectMake(10, 25 + (HEIGHTS - 45) / 5 , WIDTHS - 20, (HEIGHTS - 45) * 4 / 5);
    self.timeLabel.frame = CGRectMake(10, HEIGHTS - 20, (WIDTHS - 20) / 5, 15);
    self.playLabel.frame = CGRectMake((WIDTHS - 10) * 6 / 7 + 5, 10, (WIDTHS - 20) / 5 * 2 / 3, 15);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
